Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Python interface #71

Draft
wants to merge 85 commits into
base: main
Choose a base branch
from
Draft

New Python interface #71

wants to merge 85 commits into from

Conversation

austinschneider
Copy link
Collaborator

This PR moves logic for loading fluxes, cross sections, and detector models into the resources directory. With the idea that the logic for manipulating files, importing other packages, building tables, etc. should be relegated to python code that lives outside of siren itself. This changes the way we treat the tabulated fluxes a little bit since we don't expect the code within the resources directory to generate a file for us, but rather we expect it to return a siren.distributions.PrimaryEnergyDistribution object (that in this case happens to be a tabulated flux). This also involves essentially decoupling DarkNews from siren, since all the DarkNews-specific logic would then live within a file in the resources directory. Finally for the detector models, this means that a detector model can now take parameters since we're always calling a function to load the detector model rather than just pointing to a file.

@austinschneider austinschneider added the enhancement New feature or request label Jun 5, 2024
@austinschneider austinschneider self-assigned this Jun 5, 2024
@austinschneider
Copy link
Collaborator Author

It's been a while since I have touched on the DarkNews loading logic in detail, and it still remains untested end-to-end, but I think the logic is mostly there. It might be worth looking through the contents of resources/Processes/DarkNewsTables now @nickkamp1 just to see that everything makes sense there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants